package kaohe3;

public class kaohe3 {
	public static void sort(int[]a,int low,int high){
		if(low>=high)
			return;
		int i=low;
		int j=high;
		int key=a[i];
		while (i<j){
			while(i<j && a[j]>=key)
				j--;
			a[i++]=a[j];
			while (i<j &&a[j]<=key)
				i++;
			a[j--]=a[i];
		}
		a[i]=key;
		sort(a,low,i-1);
		sort(a,i+1,high);
	}
	public static void kaohe(int[] a){
		sort(a,0,a.length-1);
		for(int i:a)
			System.out.print(i+ " ");
}
	public static void main (String[] args){
		int[]a= {15,1,2,5,11,15,1,2,5,13};
		kaohe(a);
		}
	}
	
	
